package com.zretc.dao;

import com.zretc.entity.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author 子玉
 * 关于订单表的一些数据库操作
 */
@Repository
public interface OrderMapper {

    /**
     * 新增一条订单数据
     *
     * @param order(订单对象)
     * @return
     */
    int insertOrder(Order order);

    /**
     * 根据参数更新订单
     *
     * @author: bLUeSuMMerDreamer
     * @date: 2020/7/26 3:00
     * @param: params
     * @return: java.lang.Integer
     */
    Integer updateOrder(@Param(value = "set") Map<String, Object> setParam, @Param(value = "where") Map<String, Object> whereParam);

    /**
     * 根据参数拿到Order
     *
     * @param :params
     * @author: bLUeSuMMerDreamer
     * @date: 2020/7/28 0:35
     * @return: java.util.List<com.zretc.entity.Order>
     */
    List<Order> findOrderByParams(Map<String, Object> params);
}
